package com.twu.biblioteca.data;

/**
 * Created by florian on 5/01/14.
 */
public abstract class BibliotecaItem {

    protected int id;
    protected User checkedOutBy;

    public BibliotecaItem(int id, User checkedOutBy) {
        this.id = id;
        this.checkedOutBy = checkedOutBy;
    }

    public User getCheckedOutBy() {
        return checkedOutBy;
    }

    public void setCheckedOutBy(User checkedOutBy) {
        this.checkedOutBy = checkedOutBy;
    }

    public boolean isAvailable() {
        return checkedOutBy==null;
    }

    public int getId() {
        return id;
    }
}
